<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8" />
<meta name="layout" content="main" />
<title>Search Results</title>
</head>
<body>
	<div class="body">
		<h1>Search Results:</h1>
		<g:if test="${flash.message}">
			<div class="message">
				${flash.message}
			</div>
		</g:if>
		<table>
			
			<thead>
				<g:sortableColumn property="scientificName" title="Scientific Name" />	
				<g:sortableColumn property="quantity" title="Quantity" />
				<g:sortableColumn property="hardinessZone" title="Hardiness Zone" />
				<g:sortableColumn property="price" title="Price" />
				<g:sortableColumn property="user" title="User" />
			</thead>
			
			<tbody>

				<g:each var="seed" status = "i" in="${seeds}">
					<tr class="${(i % 2) == 0 ? 'even' : 'odd'}">
					
						<td><g:link controller="seed" action="show" id="${seed.id}"> ${seed.scientificName} </g:link></td>
						
						<td> ${seed.quantity } </td>
						
						<td> ${seed.hardinessZone } </td>
						
						<td> ${seed.price } </td>
						
						<td><g:link controller="user" action="show" id="${seed.user.id}"> ${seed.user} </g:link></td>
						
							
					</tr>
				</g:each>

			</tbody>
		</table>

	</div>
</body>
</html>